package com.agileai.pm.module.base.service;

import com.agileai.domain.DataParam;
import com.agileai.domain.DataRow;
import com.agileai.hotweb.bizmoduler.core.PickFillModelServiceImpl;
import com.agileai.pm.module.base.service.AddTeamStaff;
import com.agileai.util.StringUtil;

public class AddTeamStaffImpl
        extends PickFillModelServiceImpl
        implements AddTeamStaff {
    public AddTeamStaffImpl() {
        super();
    }

	@Override
	public void insertPrjectPeople(DataParam param) {
		String statementId = sqlNameSpace+"."+"insertPrjectPeople";
		this.daoHelper.insertRecord(statementId, param);
	}

	@Override
	public int getMaxSort(DataParam param) {
		String statementId = sqlNameSpace+"."+"getMaxSort";
    	DataRow result = this.daoHelper.getRecord(statementId, param);
    	int num = result.getInt("PP_SORT");
    	String sort = String.valueOf(num);
    	if(StringUtil.isNullOrEmpty(sort)){
    		num = 1;
    	}else{
    		num++;
    	}
		return num;
	}
}
